import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: "/Home"
  },
  {
    path: '/Home',
    name: 'Home',
    component: () => import("../views/Home/index.vue")
  },
  {
    path: '/Find',
    name: 'Find',
    component: () => import("../views/Find/index.vue")
  },
  {
    path: '/Order',
    name: 'Order',
    component: () => import("../views/Order/order.vue")
  },
  {
    path: "/detail/:id",
    name: 'Detail',
    component: () => import("../views/Detail/detail.vue")
  },
  {
    path: "/Mine",
    name: 'Mine',
    component: () => import("../views/Mine/index.vue")
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  linkActiveClass: 'active',
  routes
})

export default router
